package com.sq.partner.manager.service;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import java.util.List;

import com.sq.partner.manager.mybatis.model.NocarConInsu;
import com.sq.partner.manager.mybatis.model.NocarProd;
import com.sq.partner.manager.mybatis.model.NocarProdDefalut;
import com.sq.partner.manager.mybatis.model.NocarRisk;
import com.sq.partner.manager.mybatis.model.NocarRiskCal;
import com.sq.partner.manager.util.Page;

import java.util.Map;  

public interface IGatewayNoCarProductService extends
		BaseService<NocarProd, String> {

	public Page<NocarProd> queryPage(Page<NocarProd> page) throws SQLException;
	
	public Page<NocarProd> queryPageForNocarInsure(Page<NocarProd> page) throws SQLException;

	public NocarProd saveNoCarTradProdInst(NocarProd noCarProd) throws Exception;

	public NocarProd queryNocarTradProdInstById(String prodCode) throws SQLException;

	public Page<NocarRisk> queryRiskPlanBasePage(Page<NocarRisk> page,String prodCode) throws SQLException;

	public NocarRisk findMaxRiskProdIndex(NocarRisk noCarProd) throws SQLException;

	public void saveRisk(NocarRisk noCarRisk) throws Exception;

	public void updateRisk(NocarRisk noCarRisk) throws Exception;

	public void deleteRiskByProdCode(String prodCode) throws Exception;

	public void deleteRisk(String prodCode, String riskCode,Long nField1) throws Exception;

	public void updateNocarProd(NocarProd noCarProd) throws Exception;

	public void deleteNocarProd(String prodCode) throws Exception;

	public boolean isExistRisk(String prodCode, String riskCode) throws SQLException;

	public boolean isExistProdPlan(String prodCode) throws SQLException;
	
	public int queryProdRiskCountByCode(String prodCode) throws SQLException;
	//财险产品共保支持 begin
	public Page<NocarConInsu> queryProdConInsureInfoPage(Page<NocarConInsu> page,String prodCode) throws SQLException;
	
	public boolean saveProdConInsure(NocarConInsu noCarConInsu) throws Exception;

	public boolean deleteProdConInsureByProdCode(String prodCode) throws Exception;
	
	public boolean searchProdConInsureInfoByProdCode(String prodCode) throws Exception;
	//财险产品共保支持 end
	/**查询条件是否存在**/
	public boolean findNocarByMap(Map<String, Object> map) throws SQLException;

	//一键导出产品数据 start
	public  List<Map<String, Object>> searchNoCarProdsByprodCode(Map<String, Object> map) throws Exception;
	
	public List<Map<String, Object>> searchNoCarRisksByprodCode(Map<String, Object> map) throws Exception;
	

	public List<Map<String, Object>> searchNoCarRiskCalsByprodCode(Map<String, Object> map) throws Exception;
	

	public  List<Map<String, Object>> searchNoCarProdDefaultsByprodCode(Map<String, Object> map)  throws Exception;
	//一键导出产品数据 end
}
